/**
 * 插件
 * */

// 错误捕获
import pluginError from '@/plugins/error';
// 日志插件
import pluginLog from '@/plugins/log';
// 鉴权指令
import directiveAuth from '@/plugins/auth';

import tips from "@/plugins/tips/tips.js"; // 登录弹窗全局组件


import RegistrFinish from "@/pages/components/registrFinish/index.vue";

// 组件
import CardMain from "@/pages/components/cardMain/index.vue";
import BtnText from "@/pages/components/btnText/index.vue";
import HeadLabel from "@/pages/components/headLabel/index.vue";
import MainFormItem from "@/pages/components/mainFormItem/index.vue";
import ViewImg from "@/pages/components/viewImg/index.vue";
import PageAtion from "@/pages/components/pageation/index.vue";
import BtnPlain from "@/pages/components/btnPlain/index.vue";
import BtnData from "@/pages/components/btnData/index.vue";
import BtnBox from "@/pages/components/btnBox/index.vue";
import UploadDrag from "@/pages/components/uploadDrag/index.vue"
import ViewImageList from "@/pages/components/uploadDrag/viewImageList.vue"
export default {
    async install (Vue, options) {
        // 组件
        Vue.component("RegistrFinish", RegistrFinish);
        Vue.component("CardMain", CardMain);
        Vue.component("BtnText", BtnText);
        Vue.component("HeadLabel", HeadLabel);
        Vue.component("MainFormItem", MainFormItem);
        Vue.component("ViewImg", ViewImg);
        Vue.component("PageAtion", PageAtion);
        Vue.component("BtnPlain", BtnPlain);
        Vue.component("BtnData", BtnData);
        Vue.component("BtnBox", BtnBox);
        Vue.component("UploadDrag", UploadDrag);
        Vue.component("ViewImageList", ViewImageList);

        // 插件
        Vue.use(pluginError);
        Vue.use(pluginLog);
        Vue.prototype.$tips = tips.install; // 全局可使用this.$login调用
        // 指令
        Vue.directive('auth', directiveAuth);
    }
}
